const http = require("http");
const request = require("request");

const server = http.createServer((req,res)=>{
    request("https://v.juhe.cn/toutiao/index?type=caijing&key=c14887fe64c3c92f7cd9507b34e01257",(err,response,body)=>{
        if(!err && response.statusCode == 200){
            console.log(body);
            res.setHeader('Content-Type', 'text/plain;charset=utf-8')
            res.setHeader("Access-Control-Allow-Origin", "*")
            res.end(body)
            
      }
    })
})
server.listen(3000)
console.log(666);